﻿
CREATE TABLE dk_EnumerationCategories
(
	Id BIGINT IDENTITY(1, 1) PRIMARY KEY,
	Name NVARCHAR(50) NOT NULL,
	Description NVARCHAR(255),
	Disabled INT NOT NULL
)

CREATE TABLE dk_Enumerations
(
	Id BIGINT IDENTITY(1, 1) PRIMARY KEY,
	CategoryId BIGINT NOT NULL,
	Name NVARCHAR(50) NOT NULL,
	Description NVARCHAR(255),
	Disabled INT NOT NULL
)

GO

INSERT INTO dk_EnumerationCategories
		  SELECT 'Gender', '性别', 0
UNION ALL SELECT 'Education', '学历', 0

INSERT INTO dk_Enumerations
		  SELECT (SELECT Id FROM dk_EnumerationCategories WHERE Name = 'Gender'), 'Male', '男', 0
UNION ALL SELECT (SELECT Id FROM dk_EnumerationCategories WHERE Name = 'Gender'), 'Female', '女', 0
